export const formComponentConfig = {
  fabricateType: () =>
    import('@/views/purchase-plan/components/formComp/fabricateType.vue'),
  prepareState: () =>
    import('@/views/purchase-plan/components/formComp/fabricateType.vue'),
  dictSelect: () => import('@/common/components/dict-select/index.vue'),
  inputModal: () => import('@/common/components/search-modal/input-modal.vue'),
  searchItemUser: () => import('@/common/components/search-modal/user.vue'),
  dataPicker: () => import('./dataPicker.vue'),
};

export const formRenderConfig = {
  planListNo: {
    label: '采购计划编号',
    field: 'planListNo',
    componentName: 'input',
  },

  mdsItemCode: {
    label: '物料编码',
    field: 'mdsItemCode',
    componentName: 'inputModal',
    componentProps: {
      title: '物料编码',
      type: 'materialCode',
      labelName: 'materialCode',
      valueName: 'materialCode',
    },
  },

  brandNo: {
    label: '牌号',
    field: 'brandNo',
    componentName: 'inputModal',
    componentProps: {
      title: '牌号',
      type: 'materialCode',
      labelName: 'modelMark',
      valueName: 'modelMark',
    },
  },

  productSuperTypeNo: {
    label: '父型号',
    field: 'productSuperTypeNo',
    componentName: 'inputModal',
    componentProps: {
      title: '父型号',
      type: 'materialCode',
      labelName: 'parentModel',
      valueName: 'parentModel',
    },
  },

  mdsVendorId: {
    label: '供应商',
    field: 'mdsVendorId',
    componentName: 'inputModal',
    componentProps: {
      title: '供应商',
      type: 'supplyName',
      labelName: 'supplierChinese',
      valueName: 'id',
    },
  },

  millTypeCode: {
    label: '机型',
    field: 'millTypeCode',
    componentName: 'inputModal',
    componentProps: {
      title: '机型',
      type: 'materialCode',
      labelName: 'materialCode',
      valueName: 'materialCode',
      defaultQuery: {
        // 机型
        materialType: '6',
        materialStatus: '1,3',
      },
    },
  },

  specification: {
    label: '规格',
    field: 'specification',
    componentName: 'inputModal',
    componentProps: {
      title: '规格',
      type: 'materialCode',
      labelName: 'specification',
      valueName: 'specification',
    },
  },

  purchaseState: {
    label: '是否采购',
    field: 'purchaseState',
    componentName: 'dictSelect',
    componentProps: {
      allowClear: 'true',
      dictType: 'purchaseState',
    },
  },
  manufactureType: {
    label: '制造类型',
    field: 'manufactureType',
    componentName: 'fabricateType',
    componentProps: {},
  },
  batchNo: {
    label: '批次',
    field: 'batchNo',
    componentName: 'input',
  },
  batchFlowNo: {
    label: '架次',
    field: 'batchFlowNo',
    componentName: 'input',
  },
  editStartDate: {
    label: '编制时间（起）',
    field: 'editStartDate',
    componentName: 'datePicker',
  },
  editEndDate: {
    label: '编制时间（止）',
    field: 'editEndDate',
    componentName: 'datePicker',
  },

  editUserName: {
    label: '编制人',
    field: 'editUserName',
    componentName: 'searchItemUser',
    componentProps: {
      title: '编制人',
    },
  },
  mdsCategoryLv1Name: {
    label: '一级品类',
    field: 'mdsCategoryLv1Name',
    componentName: 'input',
  },
  mdsCategoryLv2Name: {
    label: '二级品类',
    field: 'mdsCategoryLv2Name',
    componentName: 'input',
  },
  mdsCategoryLv3Name: {
    label: '三级品类',
    field: 'mdsCategoryLv3Name',
    componentName: 'input',
  },

  missionNo: {
    label: '任务编号',
    field: 'missionNo',
    componentName: 'input',
  },
  changeNo: {
    label: '更改单编号',
    field: 'changeNo',
    componentName: 'input',
  },
};
